<?php

namespace teach\service;

use Yii;

class Category
{
    /**
     * 查询分类
     * @param $condition
     * @return array
     */
    public function CategoryList($condition)
    {
        $sql = "SELECT * FROM mall_category WHERE " . $condition . " ORDER BY sort DESC";
        $res = Yii:: $app->db->createCommand($sql)->queryAll();
        return $res;
    }
}